1. Field of the Invention
The present invention relates generally to a technique of displaying an object on a two-dimensional picture screen using three-dimensional graphics, and more particularly, to a three-dimensional graphics drawing apparatus which permits the drawing speed to be increased, a method of drawing three-dimensional graphics, and a medium recorded with such program for drawing three-dimensional graphics.
2. Description of the Background Art
The three-dimensional graphics, which require a huge amount of calculation, has been implemented in equipment storing specific hardware such as a floating point unit (hereinafter simply as FPU), a video card having a special graphic engine and a high-performance work station.
FIG. 1 is a flow chart for use in illustration of the process to implement conventional three-dimensional graphics. The user inputs three-dimensional data to produce a key frame, the positional data of an object at particular time (S101). Data including the shape, color and movement of a three-dimensional object, the eye position (visual point), field of view, and the placement of an optical source must be simplified and abstracted in expression so that a computer can handle the object as three-dimensional data. The abstraction process is generally called xe2x80x9cmodelingxe2x80x9d, and data produced by the modeling is called xe2x80x9cmodel.xe2x80x9d The model includes a shape model (the geometrical shape of an object), a surface model (information on surface color and texture), an optical source model (the size and property of an optical source), a movement model (movement and change of the object) and a field of view model (a visual point, the direction of line of vision, and the angle of sight). The three-dimensional data input in step S101 is any model other than the movement model.
Then, based on the positional data of the key frame produced in step S101, a movement model in a frame between key frames is produced by a method of obtaining an interpolated value by three-dimensional spline (step S 102). By producing the movement model, the shape model, surface model, optical source model and field of view model for each key frame do not have to be produced, the amount of necessary data can be greatly reduced.
Then, various models input in step S101 and the movement model produced in step S102 are used to calculate the shape and color of the object to be displayed on the picture screen (calculation of hidden surface, tone) (S103).
Then, in step S103, the hidden surface is processed and the tone-calculated drawing information is written into a frame memory to draw graphics on the picture screen (S104). If the drawing of the final frame previously specified by the user has not been completed, the process returns to step S103 and the above-described processing is repeated.
In recent years, in the field of commercial equipment such as car navigation system, the user came to demand more objectively easy-to-understand picture display, and much energy has been devoted to development of equipment using three-dimensional graphics. However, in equipment such as car navigation system, there is restriction in the cost and expensive hardware such an FPU and a special graphic engine could hardly be installed. In commercial equipment such as car navigation system, the above processing must be executed using a CPU (Central Processing Unit) without instructions for special graphics. Among the above described processing steps, tone must be calculated on a one-pixel-basis, a very large amount of calculation is involved, which takes long, and three-dimensional graphics could not be implemented at high speed.
It is an object of the present invention to provide three-dimensional graphics drawing apparatus which permits three-dimensional graphics to be implemented at high speed without having to install expensive hardware.
Another object of the present invention is to provide three-dimensional graphics drawing apparatus which permits three-dimensional graphics to be implemented without degrading the picture quality.
Yet another object of the present invention is to provide a method of drawing three-dimensional graphics which permits three-dimensional graphics to be implemented at high speed without having to install expensive hardware.
A further object of the present invention is to provide a method of drawing three-dimensional graphics which permits three-dimensional graphics to be implemented at high speed without degrading the picture quality.
A still further object of the present invention is to provide a medium recorded with a three-dimensional graphics drawing program which permits three-dimensional graphics to be implemented at high speed without having to install expensive hardware.
An additional object of the present invention is to provide a medium recorded with a three-dimensional graphics drawing program which permits three-dimensional graphics to be implemented at high speed without degrading the picture quality.
According to one aspect of the present invention, a three-dimensional graphics drawing apparatus includes a hidden surface calculating portion to determine whether or not a part is visible on the picture screen based on three-dimensional data, a tone calculating portion to calculate the tones of pixels at prescribed intervals in a part determined to be visible on the picture screen by the hidden surface calculating portion, an interpolating portion to interpolate pixels whose tones are not calculated based on the tones of the pixels at prescribed intervals calculated by the tone calculating portion, and a drawing portion to draw graphics on the picture screen based on the result of calculation by the tone calculating portion and the result of interpolation by the interpolating portion.
The interpolating portion interpolates the pixels whose tones are not calculated, based on the tones of pixels at prescribed intervals, calculated by the tone calculating portion, and therefore time required for calculating the tones of pixels can be reduced and the drawing speed can be increased.
According to another aspect of the present invention, the method of drawing three-dimensional graphics includes the steps of determining whether or not a part is visible on the picture screen based on three-dimensional data, calculating the tones of pixels at prescribed intervals in a part determined to be visible on the picture screen, interpolating pixels whose tone is not calculated, based on the calculated tones of pixels at prescribed intervals, and drawing graphics on the picture screen based on the pixels whose tones are calculated and the interpolated pixels.
Pixels whose tones are not calculated are interpolated based on the calculated tones of the pixels at prescribed intervals, and therefore time required for calculating the tones of pixels can be reduced, so that the drawing speed can be increased.
According to yet another aspect of the present invention, the three-dimensional graphics drawing program recorded on a medium includes the steps of determining whether a part is visible on the picture screen based on three-dimensional data, calculating the tones of pixels at prescribed intervals in a part determined to be visible on the picture screen, interpolating pixels whose tones are not calculated based on the calculated tones of the pixels at prescribed intervals, and drawing graphics on the picture screen based on the tone-calculated pixels and the interpolated pixels.
Since the pixels are interpolated based on the calculated tones of the pixels at prescribed intervals, time required for calculating the tones of pixels can be reduced, so that the drawing speed can be increased.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.